<Project>
  <Target Name="Test" DependsOnTargets="RemoveNetFrameworkProjectsOnNonWindows;GetProjectWithBestTargetFrameworks">
    <MSBuild Projects="@(InnerBuildProjectsWithBestTargetFramework)"
             Targets="Test">
    </MSBuild>
  </Target>
  <!-- Manually remove .NET Framework projects on non-Windows: https://github.com/microsoft/vstest/issues/4908 -->
  <Target Name="VSTest" DependsOnTargets="RemoveNetFrameworkProjectsOnNonWindows;GetProjectWithBestTargetFrameworks">
    <MSBuild Projects="@(InnerBuildProjectsWithBestTargetFramework)"
             Targets="VSTest">
    </MSBuild>
  </Target>
  <Target Name="RemoveNetFrameworkProjectsOnNonWindows" Condition="'$(TargetOS)' != 'windows'">
    <PropertyGroup>
      <!-- we'd try to run tests with Mono for netfx projects which doesn't work so filter them out -->
      <IncludeNetFrameworkTfms>false</IncludeNetFrameworkTfms>
    </PropertyGroup>
  </Target>
</Project>